<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

/* JoomLeague League Management and Prediction Game for Joomla!
 * Copyright (C) 2007  Robert Moss
 *  
 * Homepage: http://www.joomleague.de
 * Support: htt://www.joomleague.de/forum/
 * 
 * This file is part of JoomLeague.
 *  
 * JoomLeague is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * Please note that the GPL states that any headers in files and
 * Copyright notices as well as credits in headers, source files
 * and output (screens, prints, etc.) can not be removed.
 * You can extend them with your own credits, though...
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/copyleft/gpl.html.
*/ 

require_once "$mosConfig_absolute_path/components/com_joomleague/joomleague.js.php";?>

<!-- Header with Project Name-->
<?php if ($showTeam_config['show_project_heading'] == "1" OR $overall_config['show_project_heading'] == "1") { ?>
<div class="componentheading" <?php if ($showTeam_config['show_print_button'] == "1" OR $overall_config['show_print_button'] == "1") echo 'style="float:left;"';?>><?php echo HTML_joomleague::showTitle($project, $overall_config['project_heading_type']); ?></div>
<!-- Druckfunktion -->
<?php if ($showTeam_config['show_print_button'] == "1" OR $overall_config['show_print_button'] == "1") {
HTML_joomleague::PrintIcon( $row, $params, false, '' );
};?>
<!-- Druckfunktion Ende -->
<?php } ?>
<!-- Header END -->

<table width="100%" class="contentpaneopen">
	<tr>
		<td class="contentheading"><?php echo _JL_TEAMINFO;?><?php echo $team->name;?></td>
		<?php if ($showTeam_config['show_club_logo'] == "1") { ;?>
		<td align="right">
      <?php if (is_null($club->logo_middle)) $picture="components/com_joomleague/images/placeholders/placeholder_150.png"; else $picture=$club->logo_middle;?>   
      <img src="<?php echo $mosConfig_live_site ?>/<?php echo $picture;?>" alt="<?php  echo $club->name?>" title="<?php  echo $club->name?>" />
    </td>
    <?php } ;?>
	</tr>
</table>

<br />

<table width="96%" align="center" border="0" cellpadding="5" cellspacing="0">
  <tr>
    <td valign="top" >
      <table>
        <?php if ($team->description) { ?>
        <tr>
          <td  valign="top" width="30%"><b><?php echo _JL_TEAMINFO_TEAM_DESC;?></b></td>
          <td width="70%"><?php echo $team->description;?></td>
        </tr>
        <?php } ?>
        <tr>
          <td width="30%"><b><?php echo _JL_TEAMINFO_TEAM_SHORT;?></b></td>
          <td width="70%"><?php echo $team->short_name;?></td>
        </tr>
      </table>
    </td>
<?php if ($showTeam_config['show_club_info'] == "1") { ;?>
    <td valign="top" >
      <table>
        <tr>
          <td width="30%"><b>Club</b></td>
          <td width="70%"><a href="<?php echo sefRelToAbs($mosConfig_live_site.'/index.php?option=com_joomleague&amp;func=showClubInfo&amp;p='.$project->id.'&amp;cid='.$club->id.'&amp;Itemid='.$Itemid); ?>">
            <?php echo $club->name;?></a>
          </td>
        </tr>
        <?php if (($club->address)||($club->zipcode)||($club->location)) { ?>
        <tr>
          <td width="30%"><b><?php echo _JL_CLUB_ADDRESS;?></b></td>
          <td width="70%"><?php echo $club->address;?></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td align="left"><?php printf("%s %s", $club->zipcode, $club->location);?></td>
        </tr>
        <?php } ;?>
        <?php if ($club->phone) { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_PHONE;?></b></td>
          <td><?php echo $club->phone;?></td>
        </tr>
        <?php } ;?>
        <?php if ($club->fax) { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_FAX;?></b></td>
          <td><?php echo $club->fax;?></td>
        </tr>
        <?php } ;?>
        <?php if ($club->email) { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_EMAIL;?></b></td>
          <?
            //to prevent spam, crypt email display if nospam_email is selected
            //or user is a guest
            if ($my->id or !$overall_config['nospam_email']) {
              echo "<td><a href='mailto: $club->email'>$club->email</a></td>";
            }
            else {
              echo "<td>".str_replace("@", "[at]",$club->email )."</td>";
            }
          ?>
        </tr>
        <?php } ;?>
        <?php if ($club->website) { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_WWW;?></b></td>
          <td><a href="<?php echo $club->website;?>" target='_blank'><?php echo $club->website;?></a></td>
        </tr>
        <?php } ;?>
        <?php if ($club->president) { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_PRESIDENT;?></b></td>
          <td><?php echo $club->president;?></td>
        </tr>
        <?php } ;?>
        <?php if ($club->manager) { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_MANAGER;?></b></td>
          <td><?php echo $club->manager;?></td>
        </tr>
        <?php } ;?>
        <?php if ($club->founded) { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_FOUNDED;?></b></td>
          <td><?php echo $club->founded;?></td>
        </tr>
        <?php } ;?>
      </table>
    </td>
<?php } ;?>    
  </tr>  
</table>

<br />

<?php 
if ($showTeam_config['show_teams_seasons'] == "1") { ;?>
  <table width="96%" align="center" border="0" cellpadding="3" cellspacing="0">
  	<tr class="sectiontableheader">
        <td><?php echo _JL_TEAMINFO_SEASON;?></td>
    </tr>
  </table>  
  
  <?php 
  foreach ($rows as $row) { ?>
    <table width="96%" align="center" border="0" cellpadding="5" cellspacing="0">
    <?php 
    if ($row->projectname) { 
      ?>
      <tr><td><ul><li><a href="javascript:void(0)" onclick="switchMenu('tid<?php echo $team->id.$row->projectid;?>');" title="<?php echo _JL_SHOW_OPTIONS;?>"><?php echo $row->projectname;?></a></li></ul></td></tr>
      <?php 
    } 
    if ($row->description) { ?>
      <tr><td><b><?php echo _JL_TEAMINFO_TEAMSEASON_DESC;?></b></td><td><?php echo $row->description;?></td></tr>
      <?php 
    } 
    ?>
    </table>
        <div id="tid<?php echo $team->id.$row->projectid;?>" align="center" style="display:none">
          <?php 
          if ($showTeam_config['show_teams_logos']){
            if (is_null($row->picture)) 
              $picture="components/com_joomleague/images/placeholders/placeholder_450.png"; 
              else $picture=$row->picture;
              ?>
              <img src="<?php echo $mosConfig_live_site ?>/<?php echo $picture;?>" alt="<?php  echo $team->name?>" title="<?php  echo $team->name?>" />
              <?php
          }
          ?>
          <br />
          <a href="<?php echo sefRelToAbs($mosConfig_live_site."/index.php?option=com_joomleague&amp;func=showPlayers&amp;p=$row->projectid&amp;ttid=$row->ttid&amp;Itemid=$Itemid"); ?>"><?php echo _JL_TEAMINFO_SEASON_PLAYERS;?></a>
       </div>
    <?php
  } 
}?>

<!-- Print Button START -->
<?php if ($showTeam_config['show_back_button'] > 0 OR $overall_config['show_back_button'] > 0) {;?>
<?php if ($showTeam_config['show_back_button'] == "1" OR $overall_config['show_back_button'] == "1") echo '<div align="left">'; else echo '<div align="right">';?>
<?php
$params = & new mosParameters( '' );
$params->def( 'back_button', true );
$params->def( 'popup', false );
mosHTML::BackButton( $params );
?></div> 
<?php };?>
<!-- Print Button END -->
